package mest.service.cxj.impl;

import mest.VO.cxj.WarehouseSaveManytomanyRecordVO;
import mest.dao.cxj.WarehouseSaveManytomanyRecordDao;
import mest.entity.warehousesave_manytomany_record;
import mest.service.cxj.WarehouseSaveManytomanyRecordService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class WarehouseSaveManytomanyRecordServiceImpl implements WarehouseSaveManytomanyRecordService {

    @Resource
    private WarehouseSaveManytomanyRecordDao warehouseSaveManytomanyRecordDao;

    @Override
    public int insertRecord(warehousesave_manytomany_record wsmr,String theirDb) {
        return warehouseSaveManytomanyRecordDao.insertRecord(wsmr,theirDb);
    }

    @Override
    public List<WarehouseSaveManytomanyRecordVO> selectAllRecordByWfId(Integer page, Integer limit, Integer wfId, String theirDb) {
        return warehouseSaveManytomanyRecordDao.selectAllRecordByWfId((page-1)*limit,limit,wfId,theirDb);
    }

    @Override
    public Integer selectCountRecordByWfId(Integer wfId, String theirDb) {
        return warehouseSaveManytomanyRecordDao.selectCountRecordByWfId(wfId, theirDb);
    }

}
